Optimal. Leaf size=238 \[ -\frac {4 a b i (f h-e i) x}{d f^2}+\frac {4 b^2 i (f h-e i) x}{d f^2}+\frac {b^2 i^2 (e+f x)^2}{4 d f^3}-\frac {4 b^2 i (f h-e i) (e+f x) \log (c (e+f x))}{d f^3}-\frac {b i^2 (e+f x)^2 (a+b \log (c (e+f x)))}{2 d f^3}+\frac {2 i (f h-e i) (e+f x) (a+b \log (c (e+f x)))^2}{d f^3}+\frac {i^2 (e+f x)^2 (a+b \log (c (e+f x)))^2}{2 d f^3}+\frac {(f h-e i)^2 (a+b \log (c (e+f x)))^3}{3 b d f^3} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.36, antiderivative size = 238, normalized size of antiderivative = 1.00, number of steps
used = 16, number of rules used = 10, integrand size = 32, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.312, Rules used = {2458, 12,
2388, 2339, 30, 2333, 2332, 2367, 2342, 2341} \begin {gather*} \frac {(f h-e i)^2 (a+b \log (c (e+f x)))^3}{3 b d f^3}+\frac {2 i (e+f x) (f h-e i) (a+b \log (c (e+f x)))^2}{d f^3}+\frac {i^2 (e+f x)^2 (a+b \log (c (e+f x)))^2}{2 d f^3}-\frac {b i^2 (e+f x)^2 (a+b \log (c (e+f x)))}{2 d f^3}-\frac {4 a b i x (f h-e i)}{d f^2}-\frac {4 b^2 i (e+f x) (f h-e i) \log (c (e+f x))}{d f^3}+\frac {b^2 i^2 (e+f x)^2}{4 d f^3}+\frac {4 b^2 i x (f h-e i)}{d f^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 30
Rule 2332
Rule 2333
Rule 2339
Rule 2341
Rule 2342
Rule 2367
Rule 2388
Rule 2458
Rubi steps
\begin {align*} \int \frac {(h+185 x)^2 (a+b \log (c (e+f x)))^2}{d e+d f x} \, dx &=\frac {\text {Subst}\left (\int \frac {\left (\frac {-185 e+f h}{f}+\frac {185 x}{f}\right )^2 (a+b \log (c x))^2}{d x} \, dx,x,e+f x\right )}{f}\\ &=\frac {\text {Subst}\left (\int \frac {\left (\frac {-185 e+f h}{f}+\frac {185 x}{f}\right )^2 (a+b \log (c x))^2}{x} \, dx,x,e+f x\right )}{d f}\\ &=\frac {185 \text {Subst}\left (\int \left (\frac {-185 e+f h}{f}+\frac {185 x}{f}\right ) (a+b \log (c x))^2 \, dx,x,e+f x\right )}{d f^2}-\frac {(185 e-f h) \text {Subst}\left (\int \frac {\left (\frac {-185 e+f h}{f}+\frac {185 x}{f}\right ) (a+b \log (c x))^2}{x} \, dx,x,e+f x\right )}{d f^2}\\ &=\frac {185 \text {Subst}\left (\int \left (\frac {(-185 e+f h) (a+b \log (c x))^2}{f}+\frac {185 x (a+b \log (c x))^2}{f}\right ) \, dx,x,e+f x\right )}{d f^2}-\frac {(185 (185 e-f h)) \text {Subst}\left (\int (a+b \log (c x))^2 \, dx,x,e+f x\right )}{d f^3}+\frac {(185 e-f h)^2 \text {Subst}\left (\int \frac {(a+b \log (c x))^2}{x} \, dx,x,e+f x\right )}{d f^3}\\ &=-\frac {185 (185 e-f h) (e+f x) (a+b \log (c (e+f x)))^2}{d f^3}+\frac {34225 \text {Subst}\left (\int x (a+b \log (c x))^2 \, dx,x,e+f x\right )}{d f^3}-\frac {(185 (185 e-f h)) \text {Subst}\left (\int (a+b \log (c x))^2 \, dx,x,e+f x\right )}{d f^3}+\frac {(370 b (185 e-f h)) \text {Subst}(\int (a+b \log (c x)) \, dx,x,e+f x)}{d f^3}+\frac {(185 e-f h)^2 \text {Subst}\left (\int x^2 \, dx,x,a+b \log (c (e+f x))\right )}{b d f^3}\\ &=\frac {370 a b (185 e-f h) x}{d f^2}-\frac {370 (185 e-f h) (e+f x) (a+b \log (c (e+f x)))^2}{d f^3}+\frac {34225 (e+f x)^2 (a+b \log (c (e+f x)))^2}{2 d f^3}+\frac {(185 e-f h)^2 (a+b \log (c (e+f x)))^3}{3 b d f^3}-\frac {(34225 b) \text {Subst}(\int x (a+b \log (c x)) \, dx,x,e+f x)}{d f^3}+\frac {(370 b (185 e-f h)) \text {Subst}(\int (a+b \log (c x)) \, dx,x,e+f x)}{d f^3}+\frac {\left (370 b^2 (185 e-f h)\right ) \text {Subst}(\int \log (c x) \, dx,x,e+f x)}{d f^3}\\ &=\frac {740 a b (185 e-f h) x}{d f^2}-\frac {370 b^2 (185 e-f h) x}{d f^2}+\frac {34225 b^2 (e+f x)^2}{4 d f^3}+\frac {370 b^2 (185 e-f h) (e+f x) \log (c (e+f x))}{d f^3}-\frac {34225 b (e+f x)^2 (a+b \log (c (e+f x)))}{2 d f^3}-\frac {370 (185 e-f h) (e+f x) (a+b \log (c (e+f x)))^2}{d f^3}+\frac {34225 (e+f x)^2 (a+b \log (c (e+f x)))^2}{2 d f^3}+\frac {(185 e-f h)^2 (a+b \log (c (e+f x)))^3}{3 b d f^3}+\frac {\left (370 b^2 (185 e-f h)\right ) \text {Subst}(\int \log (c x) \, dx,x,e+f x)}{d f^3}\\ &=\frac {740 a b (185 e-f h) x}{d f^2}-\frac {740 b^2 (185 e-f h) x}{d f^2}+\frac {34225 b^2 (e+f x)^2}{4 d f^3}+\frac {740 b^2 (185 e-f h) (e+f x) \log (c (e+f x))}{d f^3}-\frac {34225 b (e+f x)^2 (a+b \log (c (e+f x)))}{2 d f^3}-\frac {370 (185 e-f h) (e+f x) (a+b \log (c (e+f x)))^2}{d f^3}+\frac {34225 (e+f x)^2 (a+b \log (c (e+f x)))^2}{2 d f^3}+\frac {(185 e-f h)^2 (a+b \log (c (e+f x)))^3}{3 b d f^3}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.12, size = 171, normalized size = 0.72 \begin {gather*} \frac {24 i (f h-e i) (e+f x) (a+b \log (c (e+f x)))^2+6 i^2 (e+f x)^2 (a+b \log (c (e+f x)))^2+\frac {4 (f h-e i)^2 (a+b \log (c (e+f x)))^3}{b}-48 b i (f h-e i) ((a-b) f x+b (e+f x) \log (c (e+f x)))+3 b i^2 \left (b f x (2 e+f x)-2 (e+f x)^2 (a+b \log (c (e+f x)))\right )}{12 d f^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(631\) vs.
\(2(230)=460\).
time = 0.52, size = 632, normalized size = 2.66 Too large to display
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Both result and optimal contain complex but leaf count of result is larger than
twice the leaf count of optimal. 606 vs. \(2 (228) = 456\).
time = 0.31, size = 606, normalized size = 2.55 \begin {gather*} -a b h^{2} {\left (\frac {2 \, \log \left (c f x + c e\right ) \log \left (d f x + d e\right )}{d f} - \frac {\log \left (f x + e\right )^{2} + 2 \, \log \left (f x + e\right ) \log \left (c\right )}{d f}\right )} + 4 i \, a b h {\left (\frac {x}{d f} - \frac {e \log \left (f x + e\right )}{d f^{2}}\right )} \log \left (c f x + c e\right ) + \frac {b^{2} h^{2} \log \left (c f x + c e\right )^{3}}{3 \, d f} + 2 i \, a^{2} h {\left (\frac {x}{d f} - \frac {e \log \left (f x + e\right )}{d f^{2}}\right )} - a b {\left (\frac {f x^{2} - 2 \, x e}{d f^{2}} + \frac {2 \, e^{2} \log \left (f x + e\right )}{d f^{3}}\right )} \log \left (c f x + c e\right ) + \frac {2 \, a b h^{2} \log \left (c f x + c e\right ) \log \left (d f x + d e\right )}{d f} - \frac {1}{2} \, a^{2} {\left (\frac {f x^{2} - 2 \, x e}{d f^{2}} + \frac {2 \, e^{2} \log \left (f x + e\right )}{d f^{3}}\right )} + \frac {a^{2} h^{2} \log \left (d f x + d e\right )}{d f} + \frac {2 i \, {\left (e \log \left (f x + e\right )^{2} - 2 \, f x + 2 \, e \log \left (f x + e\right )\right )} a b h}{d f^{2}} + \frac {{\left (f^{2} x^{2} - 6 \, f x e + 2 \, e^{2} \log \left (f x + e\right )^{2} + 6 \, e^{2} \log \left (f x + e\right )\right )} a b}{2 \, d f^{3}} - \frac {2 i \, {\left (c^{2} e \log \left (c f x + c e\right )^{3} - 3 \, {\left (c f x + c e\right )} {\left (c \log \left (c f x + c e\right )^{2} - 2 \, c \log \left (c f x + c e\right ) + 2 \, c\right )}\right )} b^{2} h}{3 \, c^{2} d f^{2}} - \frac {{\left (4 \, c^{3} e^{2} \log \left (c f x + c e\right )^{3} + 3 \, {\left (c f x + c e\right )}^{2} {\left (2 \, c \log \left (c f x + c e\right )^{2} - 2 \, c \log \left (c f x + c e\right ) + c\right )} - 24 \, {\left (c^{2} e \log \left (c f x + c e\right )^{2} - 2 \, c^{2} e \log \left (c f x + c e\right ) + 2 \, c^{2} e\right )} {\left (c f x + c e\right )}\right )} b^{2}}{12 \, c^{3} d f^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.39, size = 315, normalized size = 1.32 \begin {gather*} -\frac {24 \, {\left (-i \, a^{2} + 2 i \, a b - 2 i \, b^{2}\right )} f^{2} h x + 3 \, {\left (2 \, a^{2} - 2 \, a b + b^{2}\right )} f^{2} x^{2} - 6 \, {\left (2 \, a^{2} - 6 \, a b + 7 \, b^{2}\right )} f x e - 4 \, {\left (b^{2} f^{2} h^{2} - 2 i \, b^{2} f h e - b^{2} e^{2}\right )} \log \left (c f x + c e\right )^{3} - 6 \, {\left (2 \, a b f^{2} h^{2} + 4 i \, b^{2} f^{2} h x - b^{2} f^{2} x^{2} - {\left (2 \, a b - 3 \, b^{2}\right )} e^{2} + 2 \, {\left (b^{2} f x - 2 \, {\left (i \, a b - i \, b^{2}\right )} f h\right )} e\right )} \log \left (c f x + c e\right )^{2} - 6 \, {\left (2 \, a^{2} f^{2} h^{2} - 8 \, {\left (-i \, a b + i \, b^{2}\right )} f^{2} h x - {\left (2 \, a b - b^{2}\right )} f^{2} x^{2} - {\left (2 \, a^{2} - 6 \, a b + 7 \, b^{2}\right )} e^{2} - 2 \, {\left (2 \, {\left (i \, a^{2} - 2 i \, a b + 2 i \, b^{2}\right )} f h - {\left (2 \, a b - 3 \, b^{2}\right )} f x\right )} e\right )} \log \left (c f x + c e\right )}{12 \, d f^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 473 vs.
\(2 (218) = 436\).
time = 0.68, size = 473, normalized size = 1.99 \begin {gather*} x^{2} \left (\frac {a^{2} i^{2}}{2 d f} - \frac {a b i^{2}}{2 d f} + \frac {b^{2} i^{2}}{4 d f}\right ) + x \left (- \frac {a^{2} e i^{2}}{d f^{2}} + \frac {2 a^{2} h i}{d f} + \frac {3 a b e i^{2}}{d f^{2}} - \frac {4 a b h i}{d f} - \frac {7 b^{2} e i^{2}}{2 d f^{2}} + \frac {4 b^{2} h i}{d f}\right ) + \frac {\left (- 4 a b e i^{2} x + 8 a b f h i x + 2 a b f i^{2} x^{2} + 6 b^{2} e i^{2} x - 8 b^{2} f h i x - b^{2} f i^{2} x^{2}\right ) \log {\left (c \left (e + f x\right ) \right )}}{2 d f^{2}} + \frac {\left (b^{2} e^{2} i^{2} - 2 b^{2} e f h i + b^{2} f^{2} h^{2}\right ) \log {\left (c \left (e + f x\right ) \right )}^{3}}{3 d f^{3}} + \frac {\left (2 a^{2} e^{2} i^{2} - 4 a^{2} e f h i + 2 a^{2} f^{2} h^{2} - 6 a b e^{2} i^{2} + 8 a b e f h i + 7 b^{2} e^{2} i^{2} - 8 b^{2} e f h i\right ) \log {\left (e + f x \right )}}{2 d f^{3}} + \frac {\left (2 a b e^{2} i^{2} - 4 a b e f h i + 2 a b f^{2} h^{2} - 3 b^{2} e^{2} i^{2} + 4 b^{2} e f h i - 2 b^{2} e f i^{2} x + 4 b^{2} f^{2} h i x + b^{2} f^{2} i^{2} x^{2}\right ) \log {\left (c \left (e + f x\right ) \right )}^{2}}{2 d f^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 548 vs. \(2 (228) = 456\).
time = 5.27, size = 548, normalized size = 2.30 \begin {gather*} \frac {4 \, b^{2} f^{2} h^{2} \log \left (c f x + c e\right )^{3} + 12 \, a b f^{2} h^{2} \log \left (c f x + c e\right )^{2} + 24 i \, b^{2} f^{2} h x \log \left (c f x + c e\right )^{2} - 6 \, b^{2} f^{2} x^{2} \log \left (c f x + c e\right )^{2} - 8 i \, b^{2} f h e \log \left (c f x + c e\right )^{3} + 48 i \, a b f^{2} h x \log \left (c f x + c e\right ) - 48 i \, b^{2} f^{2} h x \log \left (c f x + c e\right ) - 12 \, a b f^{2} x^{2} \log \left (c f x + c e\right ) + 6 \, b^{2} f^{2} x^{2} \log \left (c f x + c e\right ) - 24 i \, a b f h e \log \left (c f x + c e\right )^{2} + 24 i \, b^{2} f h e \log \left (c f x + c e\right )^{2} + 12 \, b^{2} f x e \log \left (c f x + c e\right )^{2} + 12 \, a^{2} f^{2} h^{2} \log \left (f x + e\right ) + 24 i \, a^{2} f^{2} h x - 48 i \, a b f^{2} h x + 48 i \, b^{2} f^{2} h x - 6 \, a^{2} f^{2} x^{2} + 6 \, a b f^{2} x^{2} - 3 \, b^{2} f^{2} x^{2} + 24 \, a b f x e \log \left (c f x + c e\right ) - 36 \, b^{2} f x e \log \left (c f x + c e\right ) - 4 \, b^{2} e^{2} \log \left (c f x + c e\right )^{3} - 24 i \, a^{2} f h e \log \left (f x + e\right ) + 48 i \, a b f h e \log \left (f x + e\right ) - 48 i \, b^{2} f h e \log \left (f x + e\right ) + 12 \, a^{2} f x e - 36 \, a b f x e + 42 \, b^{2} f x e - 12 \, a b e^{2} \log \left (c f x + c e\right )^{2} + 18 \, b^{2} e^{2} \log \left (c f x + c e\right )^{2} - 12 \, a^{2} e^{2} \log \left (f x + e\right ) + 36 \, a b e^{2} \log \left (f x + e\right ) - 42 \, b^{2} e^{2} \log \left (f x + e\right )}{12 \, d f^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.50, size = 408, normalized size = 1.71 \begin {gather*} x\,\left (\frac {i\,\left (2\,a^2\,f\,h-3\,b^2\,e\,i+4\,b^2\,f\,h+2\,a\,b\,e\,i-4\,a\,b\,f\,h\right )}{d\,f^2}-\frac {e\,i^2\,\left (2\,a^2-2\,a\,b+b^2\right )}{2\,d\,f^2}\right )+{\ln \left (c\,\left (e+f\,x\right )\right )}^2\,\left (f\,\left (\frac {b^2\,i^2\,x^2}{2\,d\,f^2}-\frac {b^2\,i\,x\,\left (e\,i-2\,f\,h\right )}{d\,f^3}\right )+\frac {-3\,b^2\,e^2\,i^2+4\,b^2\,e\,f\,h\,i+2\,a\,b\,e^2\,i^2-4\,a\,b\,e\,f\,h\,i+2\,a\,b\,f^2\,h^2}{2\,d\,f^3}\right )+f\,\ln \left (c\,\left (e+f\,x\right )\right )\,\left (\frac {x\,\left (3\,e\,b^2\,i^2-4\,f\,h\,b^2\,i-2\,a\,e\,b\,i^2+4\,a\,f\,h\,b\,i\right )}{d\,f^3}+\frac {b\,i^2\,x^2\,\left (2\,a-b\right )}{2\,d\,f^2}\right )+\frac {\ln \left (e+f\,x\right )\,\left (2\,a^2\,e^2\,i^2-4\,a^2\,e\,f\,h\,i+2\,a^2\,f^2\,h^2-6\,a\,b\,e^2\,i^2+8\,a\,b\,e\,f\,h\,i+7\,b^2\,e^2\,i^2-8\,b^2\,e\,f\,h\,i\right )}{2\,d\,f^3}+\frac {b^2\,{\ln \left (c\,\left (e+f\,x\right )\right )}^3\,\left (e^2\,i^2-2\,e\,f\,h\,i+f^2\,h^2\right )}{3\,d\,f^3}+\frac {i^2\,x^2\,\left (2\,a^2-2\,a\,b+b^2\right )}{4\,d\,f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________